package com.ccb.jyzx.expand.tiantouonline.view.response;

import com.ccb.jyzx.expand.tiantouonline.utils.ParseDateUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * @author XIEFEI
 * @date 2019-11-22 15:21
 * @Description
 **/
public class FileHistoryInfo {
    private String fileId;
    private String batchId;
    /**
     * tfs_batch_info 表中id
     */
    private String id;
    private String fileName;
    private String name;
    private String typeId;
    private String typeName;
    private String oneName;
    private String twoName;
    private String threeName;
    private String tags;
    private String year;
    private String quarter;
    private String month;
    private String week;
    private long fileSize;
    private String uploader;
    private int state;
    private String uploadTime;
    private String uploadTimeFmt;
    private String merged;
    private String pdfTag;

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getBatchId() {
        return batchId;
    }

    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOneName() {
        return oneName;
    }

    public void setOneName(String oneName) {
        this.oneName = oneName;
    }

    public String getTwoName() {
        return twoName;
    }

    public void setTwoName(String twoName) {
        this.twoName = twoName;
    }

    public String getThreeName() {
        return threeName;
    }

    public void setThreeName(String threeName) {
        this.threeName = threeName;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getQuarter() {
        return quarter;
    }

    public void setQuarter(String quarter) {
        this.quarter = quarter;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getWeek() {
        return week;
    }

    public void setWeek(String week) {
        this.week = week;
    }

    public long getFileSize() {
        return fileSize;
    }

    public void setFileSize(long fileSize) {
        this.fileSize = fileSize;
    }

    public String getUploader() {
        return uploader;
    }

    public void setUploader(String uploader) {
        this.uploader = uploader;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(String uploadTime) {
        this.uploadTime = uploadTime;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }



    public String getUploadTimeFmt() {
        if (StringUtils.isNotBlank(this.uploadTime)){
            try {
                Date parse = ParseDateUtils.TIME_FARMAT.parse(this.uploadTime);
                return ParseDateUtils.SIMPLE_DATE_FORMAT.format(parse);
            }catch (Exception e){
                e.printStackTrace();
            }
        }

            return uploadTimeFmt;
    }

    public void setUploadTimeFmt(String uploadTimeFmt) {
        this.uploadTimeFmt = uploadTimeFmt;
    }

    public String getMerged() {
        return merged;
    }

    public void setMerged(String merged) {
        this.merged = merged;
    }

    public String getPdfTag() {
        return pdfTag;
    }

    public void setPdfTag(String pdfTag) {
        this.pdfTag = pdfTag;
    }
}
